<script setup>
  import instance from './axios';
  import { ref } from 'vue';

  
  let message = ref('')
  function getPromise() {
    return instance.get("api/rand.qinghua", {params: {format: "json"}, headers: {}})
  }

  async function getLoveMessage(){
    let {data} = await getPromise()
    message.value = data.content
  }



</script>

<template>
  <div>
    <h1 v-text="message"></h1>
    <button @click="getLoveMessage()">变</button>
  </div>
  
</template>

<style scoped>

</style>
